import Vue from 'vue'
import Router from 'vue-router'
import login from '@/modules/login/login'
import index from '@/modules/index/index'
import home from '@/modules/home/home'
/*----------------------------------商品管理----------------------------------*/ 
//仓库信息
import warehouseInfo from '@/modules/productManagement/warehouseInfo/warehouseInfo'
import editWarehouseInfo from '@/modules/productManagement/warehouseInfo/edit'
//商品信息
import goodsInfo from '@/modules/productManagement/goodsInfo/goodsInfo'
//社群商品
import associationGoods from '@/modules/productManagement/associationGoods/associationGoods'
import editAssociationGoods from '@/modules/productManagement/associationGoods/edit'
//渠道管理
import channelInfo from '@/modules/productManagement/channelInfo/channelInfo'
import editChannelInfo from '@/modules/productManagement/channelInfo/edit'
//商城商品分类
import mallProductClassify from '@/modules/productManagement/mallProductClassify/mallProductClassify'
import editMallProductClassify from '@/modules/productManagement/mallProductClassify/edit'
//商品分类
import goodsClassification from '@/modules/productManagement/goodsClassification/goodsClassification'
/*----------------------------------销售管理----------------------------------*/ 
import storeGoodsStorage from '@/modules/salesManagement/storeGoodsStorage/storeGoodsStorage'
import storeRealtimeInventory from '@/modules/salesManagement/storeRealtimeInventory/storeRealtimeInventory'
import storeGoodsSaleSummary from '@/modules/salesManagement/storeGoodsSaleSummary/storeGoodsSaleSummary'
import editStoreGoodsSaleSummary from '@/modules/salesManagement/storeGoodsSaleSummary/edit'
/*----------------------------------门店管理----------------------------------*/ 
//门店信息
import storeInfo from '@/modules/storeManagement/storeInfo/storeInfo'
//地区门店
import areaStore from '@/modules/storeManagement/areaStore/areaStore'
//门店分组
import storeGrouping from '@/modules/storeManagement/storeGrouping/storeGrouping'
import editStoreGrouping from '@/modules/storeManagement/storeGrouping/edit'
/*----------------------------------订单管理----------------------------------*/ 
import allOrder from '@/modules/orderManagement/allOrder/allOrder'
/*----------------------------------骑手管理----------------------------------*/ 
//骑手信息
import horsemanInfo from '@/modules/horsemanManagement/horsemanInfo/horsemanInfo'
import editHorsemanInfo from '@/modules/horsemanManagement/horsemanInfo/edit'
//自动派单
import autoDistribute from '@/modules/horsemanManagement/autoDistribute/autoDistribute'
//骑手通用配置
import generalConfiguration from '@/modules/horsemanManagement/generalConfiguration/generalConfiguration'
/*----------------------------------统计管理----------------------------------*/ 
import horsemanOrderData from '@/modules/statisticsManagement/horsemanOrderData/horsemanOrderData'
import editHorsemanOrderData from '@/modules/statisticsManagement/horsemanOrderData/edit'
import horsemanDeliveryData from '@/modules/statisticsManagement/horsemanDeliveryData/horsemanDeliveryData'
import deliveryDistance from '@/modules/statisticsManagement/deliveryDistance/deliveryDistance'
/*----------------------------------营销管理----------------------------------*/ 
import presell from '@/modules/marketingManagement/presell/presell'
import fullReduction from '@/modules/marketingManagement/fullReduction/fullReduction'
/*----------------------------------会员管理----------------------------------*/ 
import memberInfo from '@/modules/memberManagement/memberInfo/memberInfo'
/*----------------------------------财务管理----------------------------------*/ 
//财务报表（BI）
import financialReportBi from '@/modules/financeManagement/financialReportBi/financialReportBi'
/*----------------------------------分销管理----------------------------------*/ 
//分销员
import distributionMember from '@/modules/distributionManagement/distributionMember/distributionMember'
//业绩统计
import performanceStatistics from '@/modules/distributionManagement/performanceStatistics/performanceStatistics'
/*----------------------------------运营管理----------------------------------*/ 
import activityList from '@/modules/operationManagement/activityArticle/activityArticle'
//微页面
import microPage from '@/modules/operationManagement/microPage/microPage'
import editMicroPage from '@/modules/operationManagement/microPage/edit'
//我的文件
import myFile from '@/modules/operationManagement/myFile/myFile'
/*----------------------------------系统管理----------------------------------*/ 
//账号查询
import systemUser from '@/modules/systemManagement/systemUser/systemUser'
//账号设置
import userInfo from '@/modules/systemManagement/userInfo/userInfo'
import editUserInfo from '@/modules/systemManagement/userInfo/edit'

//操作记录
import operationRecords from '@/modules/systemManagement/operationRecord/operationRecord'
//消息推送
import messageManagement from '@/modules/systemManagement/messageManagement/messageManagement'
import editMessageManagement from '@/modules/systemManagement/messageManagement/edit'
//商城通用设置
import mallSetting from '@/modules/systemManagement/mallSetting/mallSetting'
//社群高级设置
import communitySetting from '@/modules/systemManagement/communitySetting/communitySetting'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: login
    },
    {
      path: '/login',
      name: 'login',
      component: login,
      meta: {
        isLogin: false
      }
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      meta: {
        isLogin: true
      },
      children: [
        {
          path: '/',
          component: home
        },
        {
          path: 'home',
          name: 'home',
          component: home,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'warehouseInfo',
          name: 'warehouseInfo',
          component: warehouseInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'warehouseInfo/editWarehouseInfo',
          name: 'editWarehouseInfo',
          component: editWarehouseInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'goodsInfo',
          name: 'goodsInfo',
          component: goodsInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'associationGoods',
          name: 'associationGoods',
          component: associationGoods,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'associationGoods/editAssociationGoods',
          name: 'editAssociationGoods',
          component: editAssociationGoods,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'channelInfo',
          name: 'channelInfo',
          component: channelInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'channelInfo/editChannelInfo',
          name: 'editChannelInfo',
          component: editChannelInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'mallProductClassify',
          name: 'mallProductClassify',
          component: mallProductClassify,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'mallProductClassify/editMallProductClassify',
          name: 'editMallProductClassify',
          component: editMallProductClassify,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'goodsClassification',
          name: 'goodsClassification',
          component: goodsClassification,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeGoodsStorage',
          name: 'storeGoodsStorage',
          component: storeGoodsStorage,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeRealtimeInventory',
          name: 'storeRealtimeInventory',
          component: storeRealtimeInventory,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeGoodsSaleSummary',
          name: 'storeGoodsSaleSummary',
          component: storeGoodsSaleSummary,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeGoodsSaleSummary/editStoreGoodsSaleSummary',
          name: 'editStoreGoodsSaleSummary',
          component: editStoreGoodsSaleSummary,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeInfo',
          name: 'storeInfo',
          component: storeInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'areaStore',
          name: 'areaStore',
          component: areaStore,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeGrouping',
          name: 'storeGrouping',
          component: storeGrouping,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'storeGrouping/editStoreGrouping',
          name: 'editStoreGrouping',
          component: editStoreGrouping,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'allOrder',
          name: 'allOrder',
          component: allOrder,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'horsemanInfo',
          name: 'horsemanInfo',
          component: horsemanInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'horsemanInfo/editHorsemanInfo',
          name: 'editHorsemanInfo',
          component: editHorsemanInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'autoDistribute',
          name: 'autoDistribute',
          component: autoDistribute,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'generalConfiguration',
          name: 'generalConfiguration',
          component: generalConfiguration,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'horsemanOrderData',
          name: 'horsemanOrderData',
          component: horsemanOrderData,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'horsemanOrderData/editHorsemanOrderData',
          name: 'editHorsemanOrderData',
          component: editHorsemanOrderData,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'horsemanDeliveryData',
          name: 'horsemanDeliveryData',
          component: horsemanDeliveryData,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'deliveryDistance',
          name: 'deliveryDistance',
          component: deliveryDistance,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'presell',
          name: 'presell',
          component: presell,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'fullReduction',
          name: 'fullReduction',
          component: fullReduction,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'memberInfo',
          name: 'memberInfo',
          component: memberInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'financialReportBi',
          name: 'financialReportBi',
          component: financialReportBi,
          meta: {
            isLogin: true
          }
        },
        {
          path: '/distributionMember',
          name: 'distributionMember',
          component: distributionMember,
          meta: {
            isLogin: true
          }
        },
        {
          path: '/performanceStatistics',
          name: 'performanceStatistics',
          component: performanceStatistics,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'activityList',
          name: 'activityList',
          component: activityList,
          meta: {
            isLogin: true
          }
        },
        {
          path: '/microPage',
          name: 'microPage',
          component: microPage,
          meta: {
            isLogin: true
          }
        },
        {
          path: '/microPage/editMicroPage',
          name: 'editMicroPage',
          component: editMicroPage,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'myFile',
          name: 'myFile',
          component: myFile,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'systemUser',
          name: 'systemUser',
          component: systemUser,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'userInfo',
          name: 'userInfo',
          component: userInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'userInfo/editUserInfo',
          name: 'editUserInfo',
          component: editUserInfo,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'operationRecords',
          name: 'operationRecords',
          component: operationRecords,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'messageManagement',
          name: 'messageManagement',
          component: messageManagement,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'messageManagement/editMessageManagement',
          name: 'editMessageManagement',
          component: editMessageManagement,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'mallSetting',
          name: 'mallSetting',
          component: mallSetting,
          meta: {
            isLogin: true
          }
        },
        {
          path: 'communitySetting',
          name: 'communitySetting',
          component: communitySetting,
          meta: {
            isLogin: true
          }
        }
      ]
    }
  ]
})
